//
//  ICChatViewController.h
//  ICome
//
//  Created by ENN on 16/3/10.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import "ICBaseViewController.h"
#import "YYPhotoGroupView.h"
#import "ICPubItemModel.h"
#import "ICServerModel.h"
#import "ICTransferCustomerView.h"
#import "ICShareInstance.h"
#import "ICMediaManager.h"
#import "ICChatBoxViewController.h"
#import "ICChatMessageBaseCell.h"
#import "ICChatMessageTopView.h"
@class ICMessageFrame,ICMessage,ICGroup,ICReceiveShareObject,ICShareBottomView,ICPubMenuView,ICTransferCustomerView,ICChatBoxViewController,ICChatMessageTopView;

@interface ICChatViewController : ICBaseViewController
{
    
    UIMenuItem * _copyMenuItem;
    UIMenuItem * _deleteMenuItem;
    UIMenuItem * _recallMenuItem;
    UIMenuItem * _forwardMenuItem;
    UIMenuItem * _collectMenuItem;
    
    BOOL   _isKeyBoardAppear;     // 键盘是否弹出来了
    BOOL   _isOffsetFit;          // 偏移量是否满足滚动到底部的条件
    
    BOOL _isGroupValid;
    ICShareBottomView *_shareBgView;
}
@property (nonatomic, strong) ICGroup *group;

// 搜索专用
@property (nonatomic, strong) NSMutableArray *searchArr;
@property (nonatomic, strong) NSIndexPath *indexPath;


@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray *dataSource;
// 分享
@property (nonatomic, strong)ICShareInstance *shareContent;

@property (nonatomic, strong)NSIndexPath *longIndexPath;
/**Mutabledict @功能存储数据的字典*/
@property (nonatomic, strong)NSMutableDictionary *Mutabledict;
/**users 成员数据*/
@property (nonatomic, strong) NSMutableArray *users;
@property (nonatomic, strong)ICPubMenuView *pubMenuView;
@property (nonatomic, strong)ICTransferCustomerView *transCustomerView;
@property (nonatomic, strong)ICChatBoxViewController *chatBoxVC;
@property (nonatomic, strong)UITextView *textView;
/** voice path */
@property (nonatomic, copy) NSString *voicePath;
@property (nonatomic, strong)UIImageView *currentVoiceIcon;

@property (nonatomic, strong)ICChatMessageTopView *topMessageView;

@property (nonatomic, strong)NSString *backFlag;

- (void)setupNav;

- (void)reloadTableView;

- (void)scrollToBottomAnimated:(BOOL)animated;

- (void)loadDataSource;

- (void)sendTextMessage:(NSString *)content
               messageF:(ICMessageFrame *)messageF;

- (void)sendMessage:(ICMessage *)message
           messageF:(ICMessageFrame *)messageF;

- (void)addObject:(ICMessageFrame *)messageF
         isSender:(BOOL)isSender;

- (void)sendTextMessageWithContent:(NSString *)messageStr;
//发送 @ 消息
- (void)sendATTextMessageWithContent:(NSString *)messageStr;
// 保存消息
- (void)saveUnSendMessageF:(ICMessageFrame *)messageF
                   Message:(ICMessage *)message;
// 保存红包
- (void)saveRedPacket:(ICMessageFrame *)messageF
              Message:(ICMessage *)message;
// 发送图片
- (void)sendImageMessageWithImgPath:(NSString *)imgPath;
- (void)sendImageMessage:(NSString *)imgPath
                messageF:(ICMessageFrame *)messageF;
// 发送语音
- (void)sendVoiceMessage:(NSString *)duration
               voicePath:(NSString *)voicePath;
- (void)sendVoiceMessage:(NSString *)voicePath
                messageF:(ICMessageFrame *)messageF;

// 视频
- (void)sendVideoMessage:(NSString *)videoPath
                messageF:(ICMessageFrame *)messageF;
// 视频
- (void)sendVideoImage:(ICMessageFrame *)modelFrame
             videoPath:(NSString *)videoPath;
// 视频会议
-(void)sendZoomVideoMessage:(NSString *)message;
// 文件
- (void)sendFile:(ICMessageFrame *)messageF
            path:(NSString *)path;
- (void)sendFileMessageWithFileName:(NSString *)fileName;
// 图文类型
- (void)sendPicTextMessageWithContent:(ICReceiveShareObject *)shareObject;

- (NSString *)videoPath:(ICMessageFrame *)messageF;
- (NSString *)localFilePath:(ICMessageFrame *)modelFrame;
- (void)statusChanged:(ICMessageFrame *)messageF;
- (NSString *)mediaPath:(NSString *)originPath;

- (void)messageSendFailued:(ICMessageFrame *)messageF;

- (void)handleTapGesture:(UITapGestureRecognizer *)recognizer;

- (void)showTopMessage;

- (void)setupUI;
@end
